layui.define(["layer","jquery"],function (exports) {
	var $ = layui.jquery;
   var obj = {
	       changeSkin : function($skin,$object,$isChange){
		       	if($isChange){
		       		//如果参数为真、则执行切换、否则执行加载
		       		layui.data('skin', {
					  key: 'skin',
					  value: $skin
					});
		       		//获取主题颜色
		       		var skin = layui.data('skin').skin;
		       		$.each($object, function(x,y) {
			       		$(y).css("cssText","background-color:"+skin+"!important");
			       	});
		       	}else{
		       		//获取主题颜色
		       		var skin = layui.data('skin').skin;
		       		$.each($object, function(x,y) {
			       		$(y).css("cssText","background-color:"+skin+"!important");
			       	});
		       	}
			}
	   }
   exports("common",obj);
});